/**
* ProgressBar control.
* (C) Live-5 Team. All rights reserved.
*/
class com.live5.controls.PBar extends MovieClip
{
   private	var ProgressLine:MovieClip;
	function PBar()
	{
		
	}
	
	/**
	* Set progress.
	* @param	currentProgress
	* @param	total
	*/
	function SetProgress(currentProgress:Number,total:Number){
		if(total==0||currentProgress>total){
			return;
		}
		if(currentProgress==0){
			Reset();
			return;
		}
		var percentage:Number=currentProgress/total;
		ProgressLine._width=this._width*percentage*(100/this._xscale);
		
	}
	
	/**
	* Reset the progress bar.
	*/
	function Reset(){
		ProgressLine._width =1;
	}
}
